import 'package:flutter/services.dart';

class FlutterMixPlugin {
  static const MethodChannel _channel = MethodChannel('mix_info');

  static void openPage(String page) {
    _channel.invokeMethod("openPage", "homeDetail");
  }

  static void addListener(Function(String) callback) {
    _channel.setMethodCallHandler((call) async {
      if (call.method == 'changePage') {
        callback(call.arguments);
      }
    });
  }
}
